From 5ed3e543665b1a25e47d1c72f4ad6ac497d734b7 Mon Sep 17 00:00:00 2001 From: Bar Magal Date: Fri, 10 Jul 2015 20:57:34 +0300 Subject: [PATCH] Check frame width in a non-buggy way `(window-width (frame-root-window))` throws an error when the frame is split (frame's root window is not live). --- which-key.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index e0f335a4b8d..6ff81dfc2e0 100644 --- a/which-key.el +++ b/which-key.el @@ -524,7 +524,7 @@ of the intended popup." (if (member which-key-side-window-location '(left right)) (which-key/total-width-to-text (which-key/width-or-percentage-to-width which-key-side-window-max-width)) - (window-width (frame-root-window))))) + (frame-width)))) (defun which-key/frame-max-dimensions () (cons which-key-frame-max-height which-key-frame-max-width)) -- 2.30.2